package com.ljl.ssm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ljl.ssm.entity.OrderItem;
import com.ljl.ssm.entity.User;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author BaoZhou
 * @since 2019-07-07
 */
@TableName("order_")
public class Order extends Model<Order> {

    private static final long serialVersionUID=1L;

    /**
     * 唯一索引id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单号
     */
    private String orderCode;

    /**
     * 收货地址
     */
    private String address;

    /**
     * 邮编
     */
    private String post;

    /**
     * 收货人姓名
     */
    private String receiver;

    /**
     * 手机号码
     */
    private String mobile;

    /**
     * 用户备注的信息
     */
    private String userMessage;

    /**
     * 订单创建时间
     */
    private Date createDate;

    /**
     * 订单支付时间
     */
    private Date payDate;

    /**
     * 发货日期
     */
    private Date deliveryDate;

    /**
     * 确认收货日期
     */
    private Date confirmDate;

    /**
     * 对应的用户id
     */
    private Integer userId;

    /**
     * 订单状态
     */
    private String status;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPost() {
        return post;
    }

    public void setPost(String post) {
        this.post = post;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getUserMessage() {
        return userMessage;
    }

    public void setUserMessage(String userMessage) {
        this.userMessage = userMessage;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    public Date getPayDate() {
        return payDate;
    }

    public void setPayDate(Date payDate) {
        this.payDate = payDate;
    }

    public Date getDeliveryDate() {
        return deliveryDate;
    }

    public void setDeliveryDate(Date deliveryDate) {
        this.deliveryDate = deliveryDate;
    }

    public Date getConfirmDate() {
        return confirmDate;
    }

    public void setConfirmDate(Date confirmDate) {
        this.confirmDate = confirmDate;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Order{" +
        "id=" + id +
        ", orderCode=" + orderCode +
        ", address=" + address +
        ", post=" + post +
        ", receiver=" + receiver +
        ", mobile=" + mobile +
        ", userMessage=" + userMessage +
        ", createDate=" + createDate +
        ", payDate=" + payDate +
        ", deliveryDate=" + deliveryDate +
        ", confirmDate=" + confirmDate +
        ", userId=" + userId +
        ", status=" + status +
        "}";
    }
}
